<template>
    <div>
        <img :src="codeImg" class="img-fluid" alt="Phone image" @click="getNewCodeImg" />
    </div>
</template>

<script setup lang="ts">
import { reactive, ref, onMounted, defineExpose} from "vue";

onMounted(() => {  
    getNewCodeImg();
})

const codeImg = ref("https://hzh.woide.top/com/image"); 
const getNewCodeImg =   () => {
        codeImg.value = `https://hzh.woide.top/com/image?${Math.floor( Math.random() * 100000)}`
};
defineExpose({
    getNewCodeImg
})
</script>

<style lang="scss" scoped></style>